package filter.v1;


import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2022/10/20.
 */
public class Application {
    public static void main(String[] args) {
        List<Person> persons = new ArrayList<Person>();

        persons.add(new Person("Robert","Male", "Single"));
        persons.add(new Person("John","Male", "Married"));
        persons.add(new Person("Laura","Female", "Married"));
        persons.add(new Person("Diana","Female", "Single"));
        persons.add(new Person("Mike","Male", "Single"));
        persons.add(new Person("Bobby","Male", "Single"));

        Criteria maleCriteria=new CriteriaMale();
        System.out.println(maleCriteria.meetCriteria(persons));
        System.out.println(new CriteriaFemale().meetCriteria(persons));

    }
}
